using System;
using System.Collections.Generic;
using System.Text;

namespace manaTools.mapper
{
    class CMapList
    {
        public List<CSCL.Games.Manasource.Map> mapList;
        public bool isListLoaded;

        public CMapList()
        {
            
            this.isListLoaded = false;
        }

        public int LoadList()
        {
            this.mapList = CSCL.Games.Manasource.Map.GetMapsFromMapsXml("./" + pblc.mProject.m_Config.m_sServerDataDir + "maps.xml");
            this.isListLoaded = true;
            
            return 0;
        }//End LoadList

        public int getMapIDFromMapName(string tMapName)
        {
            foreach (CSCL.Games.Manasource.Map tMap in this.mapList)
            {
                if (tMap.Name == tMapName)
                    return tMap.ID;
            }
            return 0;
        }//End getMapIDFromMapName
        
    }
}
